﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using JKF.DataModule.SqlServerDAL;
using JKF.Entities.Model;

namespace JKF.BusinessLayer.BLL
{
    /// <summary>
    /// 业务逻辑类bllSALES_NUTRITION 的摘要说明。
    /// </summary>
    public partial class bllSALES_NUTRITION
    {
        public static DataTable GetSalesNutritionPaging(string buyStart, string buyEnd, string status, string ownShops,
                                                       string filter, string filterOp, string filterKey, string currentUser, int pageCurrent,
                                                       int pageSize, ref int pageCount, ref int rowCount)
        {
            return dalSALES_NUTRITION.GetSalesNutritionPaging(buyStart, buyEnd, status, ownShops,
                                                            filter, filterOp, filterKey, currentUser, pageCurrent, pageSize,
                                                            ref pageCount, ref rowCount);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="customerKey"></param>
        /// <param name="currentUser"></param>
        /// <param name="pageCurrent"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageCount"></param>
        /// <param name="rowCount"></param>
        /// <returns></returns>
        public static DataTable GetSalesNutritionOfCustomerPaging(string customerKey, string currentUser, int pageCurrent, int pageSize,
                                                       ref int pageCount, ref int rowCount)
        {
            return dalSALES_NUTRITION.GetSalesNutritionOfCustomerPaging(customerKey, currentUser, pageCurrent, pageSize, ref pageCount, ref rowCount);
        }

        /// <summary>
        /// 删除营养系列
        /// </summary>
        /// <param name="nutritionKey"></param>
        /// <returns></returns>
        public static int RemoveSalesNutrition(string nutritionKey)
        {
            return dalSALES_NUTRITION.RemoveSaleNutrition(nutritionKey);
        }

        /// <summary>
        /// 获得顾客的营养品销售记录 Customer Info View
        /// </summary>
        /// <param name="customerKey"></param>
        /// <param name="currentUser"></param>
        /// <returns></returns>
        public static DataTable GetNutritionByCustomer(string customerKey, string currentUser)
        {
            return dalSALES_NUTRITION.GetNutritionByCustomer(customerKey, currentUser);
        }

        /// <summary>
        /// 添加营养系列数据
        /// </summary>
        /// <param name="nutrition"></param>
        /// <param name="pointlog"></param>
        /// <param name="stockOut"></param>
        /// <returns></returns>
        public static bool InsertSalesNutrition(SALES_NUTRITIONinfo nutrition, POINT_LOGinfo pointlog, STOCK_OUTinfo stockOut)
        {
            return dalSALES_NUTRITION.SalesNutritionInsert(nutrition, pointlog, stockOut);
        }

        /// <summary>
        /// 营养系列数据唯一编号
        /// </summary>
        /// <param name="shopCode"></param>
        /// <returns></returns>
        public static string GetSalesConsumeUniqueCode(string shopCode)
        {
            return dalSALES_NUTRITION.GetSalesNutritionUniqueCode(shopCode);
        }

        /// <summary>
        /// 更新营养系列数据
        /// </summary>
        /// <param name="nutritionInfo"></param>
        /// <returns></returns>
        public static bool UpdateSalesNutrition(SALES_NUTRITIONinfo nutritionInfo)
        {
            return dalSALES_NUTRITION.SalesNutritionEdit(nutritionInfo);
        }
    }
}
